package com.outsource.framework.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.outsource.framework.util.unicom.news.sso.SsoClient;

@Controller
public class WomailContrller {

	/**
	 * 
	 * @param usermobile
	 * @param type
	 * @param reuqest
	 * @return
	 */
	@RequestMapping(value="/WoWebSso",method = RequestMethod.GET)
	public String WoWebSso(
			@RequestParam("usermobile")String usermobile,
			@RequestParam("type")String type,
			HttpServletRequest reuqest){
		SsoClient ssoclient = new SsoClient();
		String html = ssoclient.requestURL(usermobile, Integer.parseInt(type));
		return "redirect:"+html;
	}
}
